package com.solution.admin.order.dao;

import java.util.List;
import java.util.Map;

import com.solution.admin.order.entity.OrderDeliveredBillEntity;
import com.solution.common.dao.BaseDao;
import com.solution.common.page.PageBean;
import com.solution.common.page.PageParam;

/**
 * 发货单DAO接口
 * @author lilp
 * @date 2017-09-18 22:56:21
 */
public interface OrderDeliveredBillDao extends BaseDao<OrderDeliveredBillEntity> {
	
	/**
	 * 保存发货单
	 * @param orderDeliveredBillEntity
	 * @return
	 * @author lilp
	 * @date 2017-09-18 22:56:21
	 */
	public long saveOrderDeliveredBill(OrderDeliveredBillEntity orderDeliveredBillEntity);

	/**
	 * 分页查询发货单信息
	 * @param pageParam 分页对象
	 * @param orderDeliveredBill 分页参数
	 * @return PageBean 分页参数及数据
	 * @author lilp
	 * @date 2017-09-18 22:56:21
	 */
	public PageBean listOrderDeliveredBillPage(PageParam pageParam, Map<String, Object> param);

	/**
	 * 更新发货单
	 * @param orderDeliveredBillEntity
	 * @return
	 * @author lilp
	 * @date 2017-09-18 22:56:21
	 */
	public int updateOrderDeliveredBill(OrderDeliveredBillEntity orderDeliveredBillEntity);


	/**
	 * 删除发货单角色
	 * @param id
	 * @return
	 * @author lilp
	 * @date 2017-09-18 22:56:21
	 */
	public int deleteOrderDeliveredBillById(Long id);
	
	/**
	 * 根据发货单类型获取发货单
	 * @param param
	 * @return
	 * @author lilp
	 * @date 2017-09-18 22:56:21
	 */
	public List<OrderDeliveredBillEntity> listOrderDeliveredBill( Map<String, Object> param);
	
	/**
	 * 查询已发货的商品清单
	 * @param paramMap
	 * @return
	 */
	public List<OrderDeliveredBillEntity> listOrderDetailDelivered(Map<String, Object> paramMap);

	/**
	 * 全部发货，插入已发货商品详情
	 * @param param
	 * @return
	 */
	public int insertDeliveredProduct(Map<String, Object> param);
	
	/**
	 * 插入部分发货发货单商品详情
	 * @param param1
	 * @return
	 */
	public int insertPartDeliveredProduct(Map<String, Object> param1);

	/**
	 * 全部签收 （更新所有订单下的所有订单单为已签收状态）
	 * @param param
	 * @return
	 */
	public int updateDeliveryBillStatus(Map<String, Object> param);

	
	/**
	 * 部分签收(更新单个发货单的签收状态 )
	 * @param param
	 * @return
	 */
	public int updateDeliveryBillSignInfo(Map<String, Object> param);
	
	/**
	 * 查询订单中所有商品是否已经全部被签收
	 * @param param
	 * @return
	 */
	public int selectOrderProductAllDeliveryed(Map<String, Object> param);
}
